﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL = Auto.Data.BusMan.BLL;
using Model = Auto.Data.BusMan.Model;

namespace Auto.BusMan.AddForm
{
    public partial class fmManagePolicyAddForm : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitPage();
            }
        }

        private void InitPage()
        {
            string docid = Request.QueryString["DocID"];
            BindData(docid);
        }

        private void BindData(string docid)
        {
            BLL.ManagementPolicy bl = new BLL.ManagementPolicy();
            Model.ManagementPolicy model = bl.GetModel(docid);

            this.lblFileName .Text = model.FileName;
            this.lblReleaseDate.Text = model.ReleaseDate.ToString("yyyy-MM-dd");
            this.lblReleaseDivID.Text = model.ReleaseDivID;
            this.ucPolicyFileFileShow.FileList = model.PolicyFile;
            this.lblMainContent.Text = model.MainContent;

        }
    }
}